package com.leetcode.q1603;

/**
 * <p> description: desc</p>
 *
 * @author tanzc
 * @date 2022/3/30
 **/
public class ParkingSystem {
    Integer a, b, c;

    public void ParkingSystem(int a, int b, int c){
        this.a = a;
        this.b = b;
        this.c = c;
    }

    public boolean addCar(int carType){
        if(carType == a){
            if(a > 0){
                a--;
                return true;
            }
        } else if(carType == b){
            if(b > 0){
                b--;
                return true;
            }
        } else if(carType == c){
            if(c > 0){
                c--;
                return true;
            }
        }
        return false;
    }
}
